// @ts-ignore
/* eslint-disable */
import { request } from '@umijs/max';

/** addFieldInfo POST /api/field_info/add */
export async function addFieldInfoUsingPost(
  body: API.FieldInfoAddRequest,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseLong_>('/api/field_info/add', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** deleteFieldInfo POST /api/field_info/delete */
export async function deleteFieldInfoUsingPost(
  body: API.DeleteRequest,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseBoolean_>('/api/field_info/delete', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** generateCreateSql POST /api/field_info/generate/sql */
export async function generateCreateSqlUsingPost1(body: number, options?: { [key: string]: any }) {
  return request<API.BaseResponseString_>('/api/field_info/generate/sql', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** getFieldInfoById GET /api/field_info/get */
export async function getFieldInfoByIdUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getFieldInfoByIdUsingGETParams,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseFieldInfo_>('/api/field_info/get', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** listFieldInfo GET /api/field_info/list */
export async function listFieldInfoUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.listFieldInfoUsingGETParams,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseListFieldInfo_>('/api/field_info/list', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** listFieldInfoByPage GET /api/field_info/list/page */
export async function listFieldInfoByPageUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.listFieldInfoByPageUsingGETParams,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponsePageFieldInfo_>('/api/field_info/list/page', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** listMyAddFieldInfoByPage GET /api/field_info/my/add/list/page */
export async function listMyAddFieldInfoByPageUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.listMyAddFieldInfoByPageUsingGETParams,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponsePageFieldInfo_>('/api/field_info/my/add/list/page', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** listMyFieldInfo GET /api/field_info/my/list */
export async function listMyFieldInfoUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.listMyFieldInfoUsingGETParams,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseListFieldInfo_>('/api/field_info/my/list', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** listMyFieldInfoByPage GET /api/field_info/my/list/page */
export async function listMyFieldInfoByPageUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.listMyFieldInfoByPageUsingGETParams,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponsePageFieldInfo_>('/api/field_info/my/list/page', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** updateFieldInfo POST /api/field_info/update */
export async function updateFieldInfoUsingPost(
  body: API.FieldInfoUpdateRequest,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseBoolean_>('/api/field_info/update', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}
